<?php

namespace App\Http\Criteria;

use App\Repository\Criteria;
use App\Repository\Constracts\RepositoryInterface as Repository;

class UserIDCriteria extends Criteria
{
    private $userId;

    public function __construct($userId)
    {
        $this->userId = $userId;
    }

    public function apply($model, Repository $repository)
    {
        return $model->where('user_id', $this->userId);
    }

}
